Remove the test functions from HVM highmem 32-bit BIOS.
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Fri, 26 Jan 2007 16:39:38 +0000 (16:39 +0000)
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Fri, 26 Jan 2007 16:39:38 +0000 (16:39 +0000)
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/firmware/rombios/32bit/32bitbios.c
tools/firmware/rombios/32bitgateway.c
tools/firmware/rombios/32bitprotos.h
tools/firmware/rombios/rombios.c

index a7cc9cf4606035fca388ab44a590dd020d3b485f..d1d8fd2561de0c99371504138121f45dcfa675ba 100644 (file)
 #include "jumptable.h"
 #include "32bitprotos.h"
 
-/* same prototypes as in the 16bit BIOS */
-Bit32u multiply(Bit32u a, Bit32u b)
-{
-       return a*b;
-}
-
-Bit32u add(Bit32u a, Bit32u b)
-{
-       return a+b;
-}
-
-static Bit32u stat_a = 0x1;
-Bit32u set_static(Bit32u a)
-{
-       Bit32u _a = stat_a;
-       stat_a = a;
-       return _a;
-}
-
-
 /*
    the jumptable that will be copied into the rombios in the 0xf000 segment
    for every function that is to be called from the lower BIOS, make an entry
@@ -51,10 +31,6 @@ Bit32u set_static(Bit32u a)
 #define TABLE_ENTRY(idx, func) [idx] = (uint32_t)func
 uint32_t jumptable[IDX_LAST+1] __attribute__((section (JUMPTABLE_SECTION_NAME))) =
 {
-       TABLE_ENTRY(IDX_MULTIPLY   , multiply),
-       TABLE_ENTRY(IDX_ADD        , add),
-       TABLE_ENTRY(IDX_SET_STATIC , set_static),
-
        TABLE_ENTRY(IDX_TCPA_ACPI_INIT, tcpa_acpi_init),
        TABLE_ENTRY(IDX_TCPA_EXTEND_ACPI_LOG, tcpa_extend_acpi_log),
 
index c224bffe5ad09d9db80dc987c3396248a0398c4f..98f61be6e4c4d4db04b4c73cd7724417488224c8 100644 (file)
@@ -418,71 +418,4 @@ ASM_END
 #include "32bitprotos.h"
 #include "32bitgateway.h"
 
-/********************************************************************
-  Collection of stub functions for functions executed in 32bit space
- *******************************************************************/
-
-Bit32u multiply(a, b) /* for testing */
-   Bit32u a;
-   Bit32u b;
-{
-       ASM_START
-       DoUpcall IDX_MULTIPLY
-       ASM_END
-}
-
-Bit32u add(a, b) /* for testing */
-   Bit32u a;
-   Bit32u b;
-{
-       ASM_START
-       DoUpcall IDX_ADD
-       ASM_END
-}
-
-Bit32u set_static(a, b) /* for testing */
-   Bit32u a;
-   Bit32u b;
-{
-       ASM_START
-       DoUpcall IDX_SET_STATIC
-       ASM_END
-}
-
-/* a function to test the gateway */
-void
-test_gateway()
-{
-       Bit32u res;
-       Bit16u err = 0;
-
-       printf("32bit gateway ");
-       res = multiply(11111L,222L);
-       if (err = 0 && res != 11111L * 222L) {
-               printf("not working correctly: multiply\n");
-               err = 1;
-       }
-
-       res = add(111111L, 222222L);
-       if (err = 0 && res != 111111L + 222222L) {
-               printf("not working correctly: add\n");
-               err = 1;
-       }
-
-       res = set_static(0x12345678L);
-       if (err = 0 && res != 0x1L) {
-               printf("not working correctly: set_static (1)\n");
-               err = 1;
-       }
-       res = set_static(0x11111111L);
-       if (err = 0 && res != 0x12345678L) {
-               printf("not working correctly: set_static (2)\n");
-               err = 1;
-       }
-
-       if (err == 0) {
-               printf("working correctly\n");
-       }
-}
-
 #include "tcgbios.c"
index e9abbd6e321a41f363fe470395cf43889709d20f..ea5d9fafcd507246de530609b490e5464a441112 100644 (file)
@@ -5,25 +5,21 @@
 /* shared include file for bcc and gcc */
 
 /* bcc does not like 'enum' */
-#define IDX_MULTIPLY                       0
-#define IDX_ADD                            1
-#define IDX_SET_STATIC                     2
-
-#define IDX_TCGINTERRUPTHANDLER            3
-#define IDX_TCPA_ACPI_INIT                 4
-#define IDX_TCPA_EXTEND_ACPI_LOG           5
-#define IDX_TCPA_CALLING_INT19H            6
-#define IDX_TCPA_RETURNED_INT19H           7
-#define IDX_TCPA_ADD_EVENT_SEPARATORS      8
-#define IDX_TCPA_WAKE_EVENT                9
-#define IDX_TCPA_ADD_BOOTDEVICE            10
-#define IDX_TCPA_START_OPTION_ROM_SCAN     11
-#define IDX_TCPA_OPTION_ROM                12
-#define IDX_TCPA_IPL                       13
-#define IDX_TCPA_INITIALIZE_TPM            14
-#define IDX_TCPA_MEASURE_POST              15
-
-#define IDX_LAST                           16 /* keep last! */
+#define IDX_TCGINTERRUPTHANDLER            0
+#define IDX_TCPA_ACPI_INIT                 1
+#define IDX_TCPA_EXTEND_ACPI_LOG           2
+#define IDX_TCPA_CALLING_INT19H            3
+#define IDX_TCPA_RETURNED_INT19H           4
+#define IDX_TCPA_ADD_EVENT_SEPARATORS      5
+#define IDX_TCPA_WAKE_EVENT                6
+#define IDX_TCPA_ADD_BOOTDEVICE            7
+#define IDX_TCPA_START_OPTION_ROM_SCAN     8
+#define IDX_TCPA_OPTION_ROM                9
+#define IDX_TCPA_IPL                       10
+#define IDX_TCPA_INITIALIZE_TPM            11
+#define IDX_TCPA_MEASURE_POST              12
+
+#define IDX_LAST                           13 /* keep last! */
 
 
 #ifdef GCC_PROTOS
   #define PARMS(x...)
 #endif
 
-Bit32u multiply( PARMS(Bit32u a, Bit32u b) );
-Bit32u add( PARMS(Bit32u a, Bit32u b) );
-Bit32u set_static( PARMS(Bit32u) );
-
 Bit32u TCGInterruptHandler( PARMS(pushad_regs_t *regs, Bit32u esds, Bit32u flags_ptr));
 
 void tcpa_acpi_init( PARMS(void) );
index ab6c06d5678536404d41fbc3fa326cf1a2cd5df4..a874b23d159e5fbbe244f1f4b2c54ff1bd824252 100644 (file)
@@ -1860,7 +1860,6 @@ print_bios_banner()
   printf("TCG-enabled BIOS.\n");
 #endif
   printf("\n");
-  test_gateway();
 }